import request from '@/utils/request'
/**
 * 地址
 */
// 分页查询
export function addressPageByQo(params) {
  return request({
    url: '/dinner/address/pageByQo',
    method: 'post',
    params
  })
}

// 批量删除
export function addressRemoveByIds(params) {
  return request({
    url: '/dinner/address/removeByIds',
    method: 'post',
    params
  })
}

// 添加,修改(type有值为修改)
export function addressSaveOrUpdate(params, type) {
  return request({
    url: type ? '/dinner/address/update' : '/dinner/address/save',
    method: 'post',
    params
  })
}

// 设置默认地址
export function addressSetDefault(params) {
  return request({
    url: '/dinner/address/setDefault',
    method: 'post',
    params
  })
}

// 详情
export function addressGetById(params) {
  return request({
    url: '/dinner/address/getById',
    method: 'post',
    params
  })
}

/**
 * 司机
 */
// 分页查询
export function driverPageByQo(params) {
  return request({
    url: '/admin/member/driver/pageByQo',
    method: 'post',
    params
  })
}

// 不分页
export function driverListByQo(params) {
  return request({
    url: '/admin/member/driver/listByQo',
    method: 'post',
    params
  })
}

// 批量删除
export function driverRemoveByIds(params) {
  return request({
    url: '/admin/member/driver/removeByIds',
    method: 'post',
    params
  })
}

// 添加,修改(type有值为修改)
export function driverSaveOrUpdate(params, type) {
  return request({
    url: type ? '/admin/member/driver/update' : '/admin/member/driver/save',
    method: 'post',
    params
  })
}

// 详情
export function driverGetById(params) {
  return request({
    url: '/admin/member/driver/getById',
    method: 'post',
    params
  })
}
